//
//  LQMainViewController.m
//  LQWeChat
//
//  Created by liquan on 2017/11/27.
//  Copyright © 2017年 liquan. All rights reserved.
//

#import "LQMainViewController.h"

#import "LQWeiViewController.h"
#import "LQAddressViewController.h"
#import "LQDiscoverViewController.h"
#import "LQMineViewController.h"


@interface LQMainViewController ()
@property(nonatomic)NSArray *titleArr;
@property(nonatomic)NSArray *normaleImageArr;
@property(nonatomic)NSArray *selectImageArr;
@property(nonatomic)NSMutableArray *controllers;
@end


@implementation LQMainViewController


- (void)viewDidLoad {
    [super viewDidLoad];
    [self lqk_setupWithControllers:self.controllers andTitleArr:self.titleArr andNormalImageArr:self.normaleImageArr andSelectImageArr:self.selectImageArr andFont:LQFont(12) andNormalTitleColor:[UIColor colorWithRed:0.71 green:0.71 blue:0.71 alpha:1] andSelectColor:[UIColor colorWithRed:0.03 green:0.73 blue:0.03 alpha:1]];
}


-(NSMutableArray *)controllers{
    if (!_controllers) {
        _controllers = [NSMutableArray array];
        
        NSArray *nameArr = @[@"LQWeiViewController",@"LQAddressViewController",@"LQDiscoverViewController",@"LQMineViewController"];

        for (NSString *className in nameArr) {
            
            Class class = NSClassFromString(className);
            UIViewController *vc = [[class alloc]init];
            LQKNavigationController *nav = [[LQKNavigationController alloc]initWithRootViewController:vc];
            
            [_controllers addObject:nav];
        }
    }
    return _controllers;
}


-(NSArray *)titleArr{
    return @[@"微信",@"通讯录",@"发现",@"我"];
}

-(NSArray *)normaleImageArr{
    return @[@"weiXin_normal",@"addressbook_normal",@"discover_normal",@"mine_normal"];
}

-(NSArray *)selectImageArr{
    return @[@"weiXin_select",@"addressbook_select",@"discover_select",@"mine_select"];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
